package com.org.example.designPattern;

/**
 * @desc:
 * @author: li si
 * @time: 2025/4/21 下午7:41
 */
public class Gongzisusuan {


    public static void suSuan(Integer yue, double gongzi, double  huaxiao, boolean zu_e, double wu_xian_xi_shu, double ji_jin_xi_shu){
        System.out.println("每月工资：" + gongzi + "元 ；  " + yue + "薪;");

        double nian_xin = yue * gongzi;
        double chu_qu_wu_xian = 0;
        double wu_xian_zong_xin = 0;

        System.out.println("年薪：" + nian_xin + "元；");
        if (zu_e){
            chu_qu_wu_xian = (nian_xin - gongzi * wu_xian_xi_shu * 12)  ;
            wu_xian_zong_xin = gongzi * wu_xian_xi_shu * 12;
        }else {
            chu_qu_wu_xian =  nian_xin - 1000 * 12;
            wu_xian_zong_xin = 1000 * 12;
        }
        System.out.println("扣除五险一金后的 税前工资 ：" + chu_qu_wu_xian + "元；");

        System.out.println("五险一金总数：" + wu_xian_zong_xin + "元；");
        double chu_qu_fang_zu = chu_qu_wu_xian - 1500 *12 - 60000;

        double dao_shou = 0;

        if (chu_qu_fang_zu < 144000 ){
            dao_shou = chu_qu_fang_zu * 0.9 + 2520;
        }else if (chu_qu_fang_zu < 300000){
            dao_shou = chu_qu_fang_zu * 0.8 + 16920;
        }else if (chu_qu_fang_zu < 4200000){
            dao_shou = chu_qu_fang_zu * 0.75 + 31920;
        }else if (chu_qu_fang_zu < 660000){
            dao_shou = chu_qu_fang_zu * 0.7 + 52920;
        }else if (chu_qu_fang_zu < 960000){
            dao_shou = chu_qu_fang_zu * 0.65 + 85920;
        }else if (chu_qu_fang_zu > 960000){
            dao_shou = chu_qu_fang_zu * 0.55 + 181920;
        }

        System.out.println("免税金额： 房租 + 保底6 w :" + ( 1500 * 12 + 60000));
        System.out.println("除去房租的免税、保底6w的免税、应纳税所得额：" + chu_qu_fang_zu + "元；");
        System.out.println("交税 ：" + (chu_qu_fang_zu - dao_shou)  + "元；");
        System.out.println("税后到手：" + (dao_shou + 60000  + 1500 * 12 )+ "元；");
        double zui_zhong_dao_shou = dao_shou + 60000 + 100 *12  - huaxiao * 12  - 1000 * 12;

        System.out.println("每月花销" + huaxiao + " 元，孝敬父母1000元。最终到手：" + zui_zhong_dao_shou + "元；");
        double gong_ji_jin = 0;
        if(zu_e){
            gong_ji_jin = gongzi * ji_jin_xi_shu * 12;
        }else {
            gong_ji_jin = gongzi * 400 * 12;
        }
        System.out.println("公积金：" + gong_ji_jin + "元；");
        System.out.println("总到手：" + (zui_zhong_dao_shou + gong_ji_jin) + "元；");
    }
}
